﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Configuration.Provider;
using System.Web.Configuration;
using System.Web;
using InfoExpress.ESM.Domains;
using InfoExpress.ESM.DataAccess;
using InfoExpress.ESM.DataAccess.Bases;

#endregion

namespace InfoExpress.ESM.DataAccess
{
	/// <summary>
	/// This class represents the Data source repository and gives access to all the underlying providers.
	/// </summary>
	[CLSCompliant(true)]
	public sealed class DataRepository 
	{
		private static volatile NetTiersProvider _provider = null;
        private static volatile NetTiersProviderCollection _providers = null;
		private static volatile NetTiersServiceSection _section = null;
        
        private static object SyncRoot = new object();
				
		private DataRepository()
		{
		}
		
		#region Public LoadProvider
		/// <summary>
        /// Enables the DataRepository to programatically create and 
        /// pass in a <c>NetTiersProvider</c> during runtime.
        /// </summary>
        /// <param name="provider">An instatiated NetTiersProvider.</param>
        public static void LoadProvider(NetTiersProvider provider)
        {
			LoadProvider(provider, false);
        }
		
		/// <summary>
        /// Enables the DataRepository to programatically create and 
        /// pass in a <c>NetTiersProvider</c> during runtime.
        /// </summary>
        /// <param name="provider">An instatiated NetTiersProvider.</param>
        /// <param name="setAsDefault">ability to set any valid provider as the default provider for the DataRepository.</param>
		public static void LoadProvider(NetTiersProvider provider, bool setAsDefault)
        {
            if (provider == null)
                throw new ArgumentNullException("provider");

            if (_providers == null)
			{
				lock(SyncRoot)
				{
            		if (_providers == null)
						_providers = new NetTiersProviderCollection();
				}
			}
			
            if (_providers[provider.Name] == null)
            {
                lock (_providers.SyncRoot)
                {
                    _providers.Add(provider);
                }
            }

            if (_provider == null || setAsDefault)
            {
                lock (SyncRoot)
                {
                    if(_provider == null || setAsDefault)
                         _provider = provider;
                }
            }
        }
		#endregion 
		
		///<summary>
		/// Configuration based provider loading, will load the providers on first call.
		///</summary>
		private static void LoadProviders()
        {
            // Avoid claiming lock if providers are already loaded
            if (_provider == null)
            {
                lock (SyncRoot)
                {
                    // Do this again to make sure _provider is still null
                    if (_provider == null)
                    {
                        // Load registered providers and point _provider to the default provider
                        _providers = new NetTiersProviderCollection();

                        ProvidersHelper.InstantiateProviders(NetTiersSection.Providers, _providers, typeof(NetTiersProvider));
						_provider = _providers[NetTiersSection.DefaultProvider];

                        if (_provider == null)
                        {
                            throw new ProviderException("Unable to load default NetTiersProvider");
                        }
                    }
                }
            }
        }

		/// <summary>
        /// Gets the provider.
        /// </summary>
        /// <value>The provider.</value>
        public static NetTiersProvider Provider
        {
            get { LoadProviders(); return _provider; }
        }

		/// <summary>
        /// Gets the provider collection.
        /// </summary>
        /// <value>The providers.</value>
        public static NetTiersProviderCollection Providers
        {
            get { LoadProviders(); return _providers; }
        }
		
		/// <summary>
		/// Creates a new <c cref="TransactionManager"/> instance from the current datasource.
		/// </summary>
		/// <returns></returns>
		public TransactionManager CreateTransaction()
		{
			return _provider.CreateTransaction();
		}

		#region Configuration

		/// <summary>
		/// Gets a reference to the configured NetTiersServiceSection object.
		/// </summary>
		public static NetTiersServiceSection NetTiersSection
		{
			get
			{
				// Try to get a reference to the default <netTiersService> section
				_section = WebConfigurationManager.GetSection("netTiersService") as NetTiersServiceSection;

				if ( _section == null )
				{
					// otherwise look for section based on the assembly name
					_section = WebConfigurationManager.GetSection("InfoExpress.ESM.DataAccess") as NetTiersServiceSection;
				}

				if ( _section == null )
				{
					throw new ProviderException("Unable to load NetTiersServiceSection");
				}

				return _section;
			}
		}

		#endregion Configuration

		#region Connections

		/// <summary>
		/// Gets a reference to the ConnectionStringSettings collection.
		/// </summary>
		public static ConnectionStringSettingsCollection ConnectionStrings
		{
			get
			{
				return WebConfigurationManager.ConnectionStrings;
			}
		}

		// dictionary of connection providers
		private static Dictionary<String, ConnectionProvider> _connections;

		/// <summary>
		/// Gets the dictionary of connection providers.
		/// </summary>
		public static Dictionary<String, ConnectionProvider> Connections
		{
			get
			{
				if ( _connections == null )
				{
					lock (SyncRoot)
                	{
						if (_connections == null)
						{
							_connections = new Dictionary<String, ConnectionProvider>();
		
							// add a connection provider for each configured connection string
							foreach ( ConnectionStringSettings conn in ConnectionStrings )
							{
								_connections.Add(conn.Name, new ConnectionProvider(conn.Name, conn.ConnectionString));
							}
						}
					}
				}

				return _connections;
			}
		}

		/// <summary>
		/// Adds the specified connection string to the map of connection strings.
		/// </summary>
		/// <param name="connectionStringName">The connection string name.</param>
		/// <param name="connectionString">The provider specific connection information.</param>
		public static void AddConnection(String connectionStringName, String connectionString)
		{
			lock (SyncRoot)
            {
				Connections.Remove(connectionStringName);
				ConnectionProvider connection = new ConnectionProvider(connectionStringName, connectionString);
				Connections.Add(connectionStringName, connection);
			}
		}

		/// <summary>
		/// Provides ability to switch connection string at runtime.
		/// </summary>
		public sealed class ConnectionProvider
		{
			private NetTiersProvider _provider;
			private NetTiersProviderCollection _providers;
			private String _connectionStringName;
			private String _connectionString;


			/// <summary>
			/// Initializes a new instance of the ConnectionProvider class.
			/// </summary>
			/// <param name="connectionStringName">The connection string name.</param>
			/// <param name="connectionString">The provider specific connection information.</param>
			public ConnectionProvider(String connectionStringName, String connectionString)
			{
				_connectionString = connectionString;
				_connectionStringName = connectionStringName;
			}

			/// <summary>
			/// Gets the provider.
			/// </summary>
			public NetTiersProvider Provider
			{
				get { LoadProviders(); return _provider; }
			}

			/// <summary>
			/// Gets the provider collection.
			/// </summary>
			public NetTiersProviderCollection Providers
			{
				get { LoadProviders(); return _providers; }
			}

			/// <summary>
			/// Instantiates the configured providers based on the supplied connection string.
			/// </summary>
			private void LoadProviders()
			{
				DataRepository.LoadProviders();

				// Avoid claiming lock if providers are already loaded
				if ( _providers == null )
				{
					lock ( SyncRoot )
					{
						// Do this again to make sure _provider is still null
						if ( _providers == null )
						{
							// apply connection information to each provider
							for ( int i = 0; i < NetTiersSection.Providers.Count; i++ )
							{
								NetTiersSection.Providers[i].Parameters["connectionStringName"] = _connectionStringName;
								// remove previous connection string, if any
								NetTiersSection.Providers[i].Parameters.Remove("connectionString");

								if ( !String.IsNullOrEmpty(_connectionString) )
								{
									NetTiersSection.Providers[i].Parameters["connectionString"] = _connectionString;
								}
							}

							// Load registered providers and point _provider to the default provider
							_providers = new NetTiersProviderCollection();

							ProvidersHelper.InstantiateProviders(NetTiersSection.Providers, _providers, typeof(NetTiersProvider));
							_provider = _providers[NetTiersSection.DefaultProvider];
						}
					}
				}
			}
		}

		#endregion Connections

		#region Static properties
		
		#region EnumsProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Enums"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static EnumsProviderBase EnumsProvider
		{
			get 
			{
				LoadProviders();
				return _provider.EnumsProvider;
			}
		}
		
		#endregion
		
		#region TeacherProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Teacher"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static TeacherProviderBase TeacherProvider
		{
			get 
			{
				LoadProviders();
				return _provider.TeacherProvider;
			}
		}
		
		#endregion
		
		#region ProgramShiftProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ProgramShift"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ProgramShiftProviderBase ProgramShiftProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ProgramShiftProvider;
			}
		}
		
		#endregion
		
		#region SessionProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Session"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static SessionProviderBase SessionProvider
		{
			get 
			{
				LoadProviders();
				return _provider.SessionProvider;
			}
		}
		
		#endregion
		
		#region PeriodProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Period"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static PeriodProviderBase PeriodProvider
		{
			get 
			{
				LoadProviders();
				return _provider.PeriodProvider;
			}
		}
		
		#endregion
		
		#region SessionPeriodProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="SessionPeriod"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static SessionPeriodProviderBase SessionPeriodProvider
		{
			get 
			{
				LoadProviders();
				return _provider.SessionPeriodProvider;
			}
		}
		
		#endregion
		
		#region CategoryProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Category"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static CategoryProviderBase CategoryProvider
		{
			get 
			{
				LoadProviders();
				return _provider.CategoryProvider;
			}
		}
		
		#endregion
		
		#region ShiftProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Shift"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ShiftProviderBase ShiftProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ShiftProvider;
			}
		}
		
		#endregion
		
		#region AccountProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Account"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static AccountProviderBase AccountProvider
		{
			get 
			{
				LoadProviders();
				return _provider.AccountProvider;
			}
		}
		
		#endregion
		
		#region ProgramProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Program"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ProgramProviderBase ProgramProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ProgramProvider;
			}
		}
		
		#endregion
		
		#region StudentProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Student"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static StudentProviderBase StudentProvider
		{
			get 
			{
				LoadProviders();
				return _provider.StudentProvider;
			}
		}
		
		#endregion
		
		#region SafeNameClassProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="SafeNameClass"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static SafeNameClassProviderBase SafeNameClassProvider
		{
			get 
			{
				LoadProviders();
				return _provider.SafeNameClassProvider;
			}
		}
		
		#endregion
		
		#region ClassScheduleProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ClassSchedule"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ClassScheduleProviderBase ClassScheduleProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ClassScheduleProvider;
			}
		}
		
		#endregion
		
		#region ClassTeacherScheduleProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ClassTeacherSchedule"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ClassTeacherScheduleProviderBase ClassTeacherScheduleProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ClassTeacherScheduleProvider;
			}
		}
		
		#endregion
		
		#region PeriodShiftProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="PeriodShift"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static PeriodShiftProviderBase PeriodShiftProvider
		{
			get 
			{
				LoadProviders();
				return _provider.PeriodShiftProvider;
			}
		}
		
		#endregion
		
		#region DetailMissPeriodProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="DetailMissPeriod"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static DetailMissPeriodProviderBase DetailMissPeriodProvider
		{
			get 
			{
				LoadProviders();
				return _provider.DetailMissPeriodProvider;
			}
		}
		
		#endregion
		
		#region DetailPeriodProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="DetailPeriod"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static DetailPeriodProviderBase DetailPeriodProvider
		{
			get 
			{
				LoadProviders();
				return _provider.DetailPeriodProvider;
			}
		}
		
		#endregion
		
		#region FreePeriodProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="FreePeriod"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static FreePeriodProviderBase FreePeriodProvider
		{
			get 
			{
				LoadProviders();
				return _provider.FreePeriodProvider;
			}
		}
		
		#endregion
		
		
		#endregion
	}
	
	#region Query/Filters
		
	#region EnumsFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Enums"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class EnumsFilters : EnumsFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the EnumsFilters class.
		/// </summary>
		public EnumsFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the EnumsFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public EnumsFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the EnumsFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public EnumsFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion EnumsFilters
	
	#region EnumsQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="EnumsParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Enums"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class EnumsQuery : EnumsParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the EnumsQuery class.
		/// </summary>
		public EnumsQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the EnumsQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public EnumsQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the EnumsQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public EnumsQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion EnumsQuery
		
	#region TeacherFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Teacher"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class TeacherFilters : TeacherFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the TeacherFilters class.
		/// </summary>
		public TeacherFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the TeacherFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public TeacherFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the TeacherFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public TeacherFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion TeacherFilters
	
	#region TeacherQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="TeacherParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Teacher"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class TeacherQuery : TeacherParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the TeacherQuery class.
		/// </summary>
		public TeacherQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the TeacherQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public TeacherQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the TeacherQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public TeacherQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion TeacherQuery
		
	#region ProgramShiftFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ProgramShift"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProgramShiftFilters : ProgramShiftFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProgramShiftFilters class.
		/// </summary>
		public ProgramShiftFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProgramShiftFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProgramShiftFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProgramShiftFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProgramShiftFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProgramShiftFilters
	
	#region ProgramShiftQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ProgramShiftParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ProgramShift"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProgramShiftQuery : ProgramShiftParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProgramShiftQuery class.
		/// </summary>
		public ProgramShiftQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProgramShiftQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProgramShiftQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProgramShiftQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProgramShiftQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProgramShiftQuery
		
	#region SessionFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Session"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class SessionFilters : SessionFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the SessionFilters class.
		/// </summary>
		public SessionFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the SessionFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public SessionFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the SessionFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public SessionFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion SessionFilters
	
	#region SessionQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SessionParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Session"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class SessionQuery : SessionParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the SessionQuery class.
		/// </summary>
		public SessionQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the SessionQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public SessionQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the SessionQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public SessionQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion SessionQuery
		
	#region PeriodFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Period"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PeriodFilters : PeriodFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PeriodFilters class.
		/// </summary>
		public PeriodFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the PeriodFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PeriodFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PeriodFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PeriodFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PeriodFilters
	
	#region PeriodQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="PeriodParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Period"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PeriodQuery : PeriodParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PeriodQuery class.
		/// </summary>
		public PeriodQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the PeriodQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PeriodQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PeriodQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PeriodQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PeriodQuery
		
	#region SessionPeriodFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="SessionPeriod"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class SessionPeriodFilters : SessionPeriodFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the SessionPeriodFilters class.
		/// </summary>
		public SessionPeriodFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the SessionPeriodFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public SessionPeriodFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the SessionPeriodFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public SessionPeriodFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion SessionPeriodFilters
	
	#region SessionPeriodQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SessionPeriodParameterBuilder"/> class
	/// that is used exclusively with a <see cref="SessionPeriod"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class SessionPeriodQuery : SessionPeriodParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the SessionPeriodQuery class.
		/// </summary>
		public SessionPeriodQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the SessionPeriodQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public SessionPeriodQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the SessionPeriodQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public SessionPeriodQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion SessionPeriodQuery
		
	#region CategoryFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Category"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class CategoryFilters : CategoryFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the CategoryFilters class.
		/// </summary>
		public CategoryFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the CategoryFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public CategoryFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the CategoryFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public CategoryFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion CategoryFilters
	
	#region CategoryQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="CategoryParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Category"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class CategoryQuery : CategoryParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the CategoryQuery class.
		/// </summary>
		public CategoryQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the CategoryQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public CategoryQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the CategoryQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public CategoryQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion CategoryQuery
		
	#region ShiftFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Shift"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ShiftFilters : ShiftFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ShiftFilters class.
		/// </summary>
		public ShiftFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ShiftFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ShiftFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ShiftFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ShiftFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ShiftFilters
	
	#region ShiftQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ShiftParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Shift"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ShiftQuery : ShiftParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ShiftQuery class.
		/// </summary>
		public ShiftQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ShiftQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ShiftQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ShiftQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ShiftQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ShiftQuery
		
	#region AccountFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Account"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class AccountFilters : AccountFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the AccountFilters class.
		/// </summary>
		public AccountFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the AccountFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public AccountFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the AccountFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public AccountFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion AccountFilters
	
	#region AccountQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="AccountParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Account"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class AccountQuery : AccountParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the AccountQuery class.
		/// </summary>
		public AccountQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the AccountQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public AccountQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the AccountQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public AccountQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion AccountQuery
		
	#region ProgramFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Program"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProgramFilters : ProgramFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProgramFilters class.
		/// </summary>
		public ProgramFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProgramFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProgramFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProgramFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProgramFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProgramFilters
	
	#region ProgramQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ProgramParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Program"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ProgramQuery : ProgramParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ProgramQuery class.
		/// </summary>
		public ProgramQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ProgramQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ProgramQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ProgramQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ProgramQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ProgramQuery
		
	#region StudentFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Student"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class StudentFilters : StudentFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the StudentFilters class.
		/// </summary>
		public StudentFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the StudentFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public StudentFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the StudentFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public StudentFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion StudentFilters
	
	#region StudentQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="StudentParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Student"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class StudentQuery : StudentParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the StudentQuery class.
		/// </summary>
		public StudentQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the StudentQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public StudentQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the StudentQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public StudentQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion StudentQuery
		
	#region SafeNameClassFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="SafeNameClass"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class SafeNameClassFilters : SafeNameClassFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the SafeNameClassFilters class.
		/// </summary>
		public SafeNameClassFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the SafeNameClassFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public SafeNameClassFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the SafeNameClassFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public SafeNameClassFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion SafeNameClassFilters
	
	#region SafeNameClassQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SafeNameClassParameterBuilder"/> class
	/// that is used exclusively with a <see cref="SafeNameClass"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class SafeNameClassQuery : SafeNameClassParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the SafeNameClassQuery class.
		/// </summary>
		public SafeNameClassQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the SafeNameClassQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public SafeNameClassQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the SafeNameClassQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public SafeNameClassQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion SafeNameClassQuery
		
	#region ClassScheduleFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ClassSchedule"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ClassScheduleFilters : ClassScheduleFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ClassScheduleFilters class.
		/// </summary>
		public ClassScheduleFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ClassScheduleFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ClassScheduleFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ClassScheduleFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ClassScheduleFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ClassScheduleFilters
	
	#region ClassScheduleQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ClassScheduleParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ClassSchedule"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ClassScheduleQuery : ClassScheduleParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ClassScheduleQuery class.
		/// </summary>
		public ClassScheduleQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ClassScheduleQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ClassScheduleQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ClassScheduleQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ClassScheduleQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ClassScheduleQuery
		
	#region ClassTeacherScheduleFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ClassTeacherSchedule"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ClassTeacherScheduleFilters : ClassTeacherScheduleFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ClassTeacherScheduleFilters class.
		/// </summary>
		public ClassTeacherScheduleFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ClassTeacherScheduleFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ClassTeacherScheduleFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ClassTeacherScheduleFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ClassTeacherScheduleFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ClassTeacherScheduleFilters
	
	#region ClassTeacherScheduleQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ClassTeacherScheduleParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ClassTeacherSchedule"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ClassTeacherScheduleQuery : ClassTeacherScheduleParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ClassTeacherScheduleQuery class.
		/// </summary>
		public ClassTeacherScheduleQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ClassTeacherScheduleQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ClassTeacherScheduleQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ClassTeacherScheduleQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ClassTeacherScheduleQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ClassTeacherScheduleQuery
		
	#region PeriodShiftFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="PeriodShift"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PeriodShiftFilters : PeriodShiftFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PeriodShiftFilters class.
		/// </summary>
		public PeriodShiftFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the PeriodShiftFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PeriodShiftFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PeriodShiftFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PeriodShiftFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PeriodShiftFilters
	
	#region PeriodShiftQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="PeriodShiftParameterBuilder"/> class
	/// that is used exclusively with a <see cref="PeriodShift"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PeriodShiftQuery : PeriodShiftParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PeriodShiftQuery class.
		/// </summary>
		public PeriodShiftQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the PeriodShiftQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PeriodShiftQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PeriodShiftQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PeriodShiftQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PeriodShiftQuery
		
	#region DetailMissPeriodFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="DetailMissPeriod"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class DetailMissPeriodFilters : DetailMissPeriodFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the DetailMissPeriodFilters class.
		/// </summary>
		public DetailMissPeriodFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the DetailMissPeriodFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public DetailMissPeriodFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the DetailMissPeriodFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public DetailMissPeriodFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion DetailMissPeriodFilters
	
	#region DetailMissPeriodQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="DetailMissPeriodParameterBuilder"/> class
	/// that is used exclusively with a <see cref="DetailMissPeriod"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class DetailMissPeriodQuery : DetailMissPeriodParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the DetailMissPeriodQuery class.
		/// </summary>
		public DetailMissPeriodQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the DetailMissPeriodQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public DetailMissPeriodQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the DetailMissPeriodQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public DetailMissPeriodQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion DetailMissPeriodQuery
		
	#region DetailPeriodFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="DetailPeriod"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class DetailPeriodFilters : DetailPeriodFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the DetailPeriodFilters class.
		/// </summary>
		public DetailPeriodFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the DetailPeriodFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public DetailPeriodFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the DetailPeriodFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public DetailPeriodFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion DetailPeriodFilters
	
	#region DetailPeriodQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="DetailPeriodParameterBuilder"/> class
	/// that is used exclusively with a <see cref="DetailPeriod"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class DetailPeriodQuery : DetailPeriodParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the DetailPeriodQuery class.
		/// </summary>
		public DetailPeriodQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the DetailPeriodQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public DetailPeriodQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the DetailPeriodQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public DetailPeriodQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion DetailPeriodQuery
		
	#region FreePeriodFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="FreePeriod"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class FreePeriodFilters : FreePeriodFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the FreePeriodFilters class.
		/// </summary>
		public FreePeriodFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the FreePeriodFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public FreePeriodFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the FreePeriodFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public FreePeriodFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion FreePeriodFilters
	
	#region FreePeriodQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="FreePeriodParameterBuilder"/> class
	/// that is used exclusively with a <see cref="FreePeriod"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class FreePeriodQuery : FreePeriodParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the FreePeriodQuery class.
		/// </summary>
		public FreePeriodQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the FreePeriodQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public FreePeriodQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the FreePeriodQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public FreePeriodQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion FreePeriodQuery
	#endregion

	
}
